﻿using Abp.AspNetCore.Mvc.Controllers;
using Abp.Runtime.Caching;
using Batman.Jianbei.Forum.Areas.Forum.Responses;
using Batman.Jianbei.Forum.Services.Forum;
using Microsoft.AspNetCore.Mvc;

namespace Batman.Jianbei.Forum.Areas.Forum
{
    /// <summary>
    /// 论坛汇总数据
    /// </summary>
    [Area("forum")]
    public class SummaryController : AbpController
    {
        public SummaryService SummaryService { get; set; }

        public ICacheManager CacheManager { get; set; }

        /// <summary>
        /// 个人中心汇总数据
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            var wxuid = User.GetWxUserId();
            
            var result = SummaryService.GetSummaryInfo(wxuid);

            return Json(result);
        }

        /// <summary>
        /// 访问用户主页
        /// </summary>
        /// <param name="wxUId"></param>
        /// <returns></returns>
        public IActionResult Zone(string wxUId)
        {
            var result = SummaryService.GetSummaryInfo(wxUId);

            return Json(result);
        }
    }
}